using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using XBLib.Dal;
using XBLib.Dal.AdoDal;
using XBLib.BusinessObject;

using System.Data.Common;
using DataInfo;

namespace KenLib.Dal
{
    public class 資格コードDao : BaseAdoDao
      {
        public DataTable Select資格コード()
        {
            DbCommand command = _daoHelper.CreateCommand("sp_select_資格コード", CommandType.StoredProcedure);
            return _daoHelper.Query(command);
        }

        public string Insert資格情報(資格情報 obj)
        {
            DbParameter param廃止区分 = _daoHelper.CreateParameter("@廃止区分", obj.廃止区分, DbType.Int16);
            DbParameter param資格コード = _daoHelper.CreateParameter("@資格コード", obj.資格コード, DbType.String);
            DbParameter param資格 = _daoHelper.CreateParameter("@資格", obj.資格, DbType.String);
            DbParameter param実際開始日 = _daoHelper.CreateParameter("@実際開始日", obj.実際開始日, DbType.DateTime);
            DbParameter param発令開始日 = _daoHelper.CreateParameter("@発令開始日", obj.発令開始日, DbType.DateTime);
            DbParameter param社員ID = _daoHelper.CreateParameter("@社員ID", obj.社員ID, DbType.Int32);

            DbCommand command = _daoHelper.CreateCommand("sp_Insert_FrmO_EmpDegreeByCompInput_Hunglt", CommandType.StoredProcedure,
               param廃止区分, param資格コード, param資格, param実際開始日, param発令開始日, param社員ID);
            //_daoHelper.Query(command);
			return _daoHelper.ExecuteScalar(command).ToString();
        }


        #region Phuong
        public DataTable GetAll資格コード()
        {

            DbCommand command = _daoHelper.CreateCommand(CommandNameManager.sp_frmJ_StaffDegreeByCompInput_GetDll_Phuong, CommandType.StoredProcedure);
            return _daoHelper.Query(command);
        }
        public DataTable selectAll資格情報(int 社員ID)
        {
            DbParameter param = _daoHelper.CreateParameter("@社員ID", 社員ID, DbType.Int32);
            DbCommand command = _daoHelper.CreateCommand("selectAll資格情報_luclt", CommandType.StoredProcedure, param);
            return _daoHelper.Query(command);
        }
        #endregion




      }
}
